Skip to content

Comments

chore: merge from develop to preview#4426

Merged
jorbuedo merged 5 commits intopreviewfrom
develop
Dec 12, 2025
Merged

chore: merge from develop to preview#4426
jorbuedo merged 5 commits intopreviewfrom
develop

Conversation

@jorbuedo
Copy link
Contributor

@jorbuedo jorbuedo commented Dec 12, 2025

Note

Improve UTXO selection by accounting for token change min-UTXO and preferring pure ADA UTXOs; add gradient styling to airdrop cards; remove wallet-list feature flags to always show syncing/check states.

  • Transaction builder (mobile/packages/tx/transaction-builder/helpers.ts)
    • Enhance selectUtxosForAmounts to:
      • Compute tokens remaining in change and estimate change output min-UTXO based on token count.
      • Prefer pure ADA UTXOs when adding inputs; dynamically update min-UTXO and required ADA if tokens are introduced.
  • Airdrop UI
    • AirdropDetailsScreen: Use LinearGradient background for the “Redeemable Now” card and adjust borders/overflow styling.
    • AirdropSelectionScreen: Add gradient background on press/redeemable cards; minor layout/style tweaks.
  • Wallet list
    • WalletListItem: Always show syncing Loading and selected check; remove feature-flag gating.
  • Feature flags (mobile/src/kernel/features.ts)
    • Remove unused flags (e.g., wallet list feedback/swipeable); cleanup config.

Written by Cursor Bugbot for commit 2503b9a. This will update automatically on new commits. Configure here.

@jorbuedo jorbuedo merged commit c52dea4 into preview Dec 12, 2025
4 of 6 checks passed
}
}

if (selectedAda >= requiredAda) break
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: UTXO token tracking occurs before selection decision

In the UTXO selection loop, currentTokensInChange and requiredAda are updated based on the current UTXO's tokens before checking whether to select the UTXO. This means if the loop breaks at line 418 after updating these values, the tokens were counted as going to change even though the UTXO was never added to selected. Additionally, by increasing requiredAda before deciding to include the UTXO, the algorithm may select more UTXOs than necessary, since each UTXO with tokens increases the requirement before its ADA contribution is added to selectedAda. The token tracking and requiredAda recalculation (lines 394-416) should happen after adding the UTXO to selected (lines 419-420), not before checking the break condition.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant